package net.oilcake.mitelros.item.register;

import huix.glacier.api.extension.creativetab.GlacierCreativeTabs;
import net.minecraft.CreativeTabs;
import net.minecraft.Item;
import net.oilcake.mitelros.block.Blocks;
import net.oilcake.mitelros.item.Items;
import net.xiaoyu233.fml.reload.event.ItemRegistryEvent;

import static net.oilcake.mitelros.ITFStart.NameSpace;

public class ItemRegistry extends Items {
    public static final CreativeTabs ITFItem = new GlacierCreativeTabs("itf_reborn.item") {
        @Override
        public int getTabIconItemIndex() {
            return Items.enderWand.itemID;
        }
    };
    public static final CreativeTabs ITFBlock = new GlacierCreativeTabs("itf_reborn.block") {
        @Override
        public int getTabIconItemIndex() {
            return Blocks.magicTable.blockID;
        }
    };

    private static ItemRegistryEvent eventCache = null;

    public static void registerItems(ItemRegistryEvent event) {
        eventCache = event;
        register("miteitfrb:armor/nickel_helmet", nickelHelmet);
        register("miteitfrb:armor/nickel_chestplate", nickelChestplate);
        register("miteitfrb:armor/nickel_leggings", nickelLeggings);
        register("miteitfrb:armor/nickel_boots", nickelBoots);
        register("miteitfrb:armor/nickel_chainmail_helmet", nickelHelmetChain);
        register("miteitfrb:armor/nickel_chainmail_chestplate", nickelChestplateChain);
        register("miteitfrb:armor/nickel_chainmail_leggings", nickelLeggingsChain);
        register("miteitfrb:armor/nickel_chainmail_boots", nickelBootsChain);
        register("miteitfrb:ingots/nickel", nickelIngot);
        register("miteitfrb:nuggets/nickel", nickelNugget);
        register("miteitfrb:tools/nickel_axe", nickelAxe);
        register("miteitfrb:tools/nickel_battle_axe", nickelBattleAxe);
        register("miteitfrb:tools/nickel_dagger", nickelDagger);
        register("miteitfrb:tools/nickel_hatchet", nickelHatchet);
        register("miteitfrb:tools/nickel_hoe", nickelHoe);
        register("miteitfrb:tools/nickel_knife", nickelKnife);
        register("miteitfrb:tools/nickel_pickaxe", nickelPickaxe);
        register("miteitfrb:tools/nickel_mattock", nickelMattock);
        register("miteitfrb:tools/nickel_scythe", nickelScythe);
        register("miteitfrb:tools/nickel_shears", nickelShears);
        register("miteitfrb:tools/nickel_shovel", nickelShovel);
        register("miteitfrb:tools/nickel_sword", nickelSword);
        register("miteitfrb:tools/nickel_war_hammer", nickelWarHammer);
        register("miteitfrb:doors/nickel", doorNickel);
        register("miteitfrb:chain/nickel", nickelChain);
        register("miteitfrb:coins/nickel", nickelCoin);
        register("miteitfrb:arrows/nickel_arrow", arrowNickel);
        register("miteitfrb:armor/tungsten_helmet", tungstenHelmet);
        register("miteitfrb:armor/tungsten_chestplate", tungstenChestplate);
        register("miteitfrb:armor/tungsten_leggings", tungstenLeggings);
        register("miteitfrb:armor/tungsten_boots", tungstenBoots);
        register("miteitfrb:armor/tungsten_chainmail_helmet", tungstenHelmetChain);
        register("miteitfrb:armor/tungsten_chainmail_chestplate", tungstenChestplateChain);
        register("miteitfrb:armor/tungsten_chainmail_leggings", tungstenLeggingsChain);
        register("miteitfrb:armor/tungsten_chainmail_boots", tungstenBootsChain);
        register("miteitfrb:ingots/tungsten", tungstenIngot);
        register("miteitfrb:nuggets/tungsten", tungstenNugget);
        register("miteitfrb:tools/tungsten_axe", tungstenAxe);
        register("miteitfrb:tools/tungsten_battle_axe", tungstenBattleAxe);
        register("miteitfrb:tools/tungsten_dagger", tungstenDagger);
        register("miteitfrb:tools/tungsten_hatchet", tungstenHatchet);
        register("miteitfrb:tools/tungsten_hoe", tungstenHoe);
        register("miteitfrb:tools/tungsten_knife", tungstenKnife);
        register("miteitfrb:tools/tungsten_pickaxe", tungstenPickaxe);
        register("miteitfrb:tools/tungsten_mattock", tungstenMattock);
        register("miteitfrb:tools/tungsten_scythe", tungstenScythe);
        register("miteitfrb:tools/tungsten_shears", tungstenShears);
        register("miteitfrb:tools/tungsten_shovel", tungstenShovel);
        register("miteitfrb:tools/tungsten_sword", tungstenSword);
        register("miteitfrb:tools/tungsten_war_hammer", tungstenWarHammer);
        register("miteitfrb:doors/tungsten", doorTungsten);
        register("miteitfrb:chain/tungsten", tungstenChain);
        register("miteitfrb:coins/tungsten", tungstenCoin);
        register("miteitfrb:arrows/tungsten_arrow", arrowTungsten);
        register("miteitfrb:bowls/porkchop_stew", bowlPorkchopStew);
        register("miteitfrb:bowls/lampchop_stew", bowlLampchopStew);
        register("miteitfrb:bowls/salmon_soup", bowlSalmonSoup);
        register("miteitfrb:bowls/beetroot_soup", bowlBeetrootSoup);
        register("miteitfrb:pieces/copper", pieceCopper);
        register("miteitfrb:pieces/silver", pieceSilver);
        register("miteitfrb:pieces/gold", pieceGold);
        register("miteitfrb:pieces/gold_nether", pieceGoldNether);
        register("miteitfrb:pieces/iron", pieceIron);
        register("miteitfrb:pieces/nickel", pieceNickel);
        register("miteitfrb:pieces/tungsten", pieceTungsten);
        register("miteitfrb:pieces/mithril", pieceMithril);
        register("miteitfrb:pieces/adamantium", pieceAdamantium);
        register("miteitfrb:food/mashed_cactus", mashedCactus);
        register("miteitfrb:food/lemon", lemon);
        register("miteitfrb:food/lemon_pie", lemonPie);
        register("miteitfrb:bowls/lemonade", bowlLemonade);
        register("miteitfrb:buckets/nickel/empty", nickelBucket);
        register("miteitfrb:buckets/nickel/lava", nickelBucketLava);
        register("miteitfrb:buckets/nickel/milk", nickelBucketMilk);
        register("miteitfrb:buckets/nickel/stone", nickelBucketStone);
        register("miteitfrb:buckets/nickel/water", nickelBucketWater);
        register("miteitfrb:buckets/tungsten/empty", tungstenBucket);
        register("miteitfrb:buckets/tungsten/lava", tungstenBucketLava);
        register("miteitfrb:buckets/tungsten/milk", tungstenBucketMilk);
        register("miteitfrb:buckets/tungsten/stone", tungstenBucketStone);
        register("miteitfrb:buckets/tungsten/water", tungstenBucketWater);
        register("miteitfrb:bowls/bowl_water_pure", bowlWaterPure);
        register("miteitfrb:buckets/copper/water_pure", copperBucketWaterPure);
        register("miteitfrb:buckets/silver/water_pure", silverBucketWaterPure);
        register("miteitfrb:buckets/gold/water_pure", goldBucketWaterPure);
        register("miteitfrb:buckets/iron/water_pure", ironBucketWaterPure);
        register("miteitfrb:buckets/nickel/water_pure", nickelBucketWaterPure);
        register("miteitfrb:buckets/mithril/water_pure", mithrilBucketWaterPure);
        register("miteitfrb:buckets/tungsten/water_pure", tungstenBucketWaterPure);
        register("miteitfrb:buckets/adamantium/water_pure", adamantiumBucketWaterPure);
        register("miteitfrb:buckets/ancient_metal/water_pure", ancientmetalBucketWaterPure);
        register("miteitfrb:misc/wolf_fur", wolf_fur);
        register("miteitfrb:food/horse_meat", horse_meat);
        register("miteitfrb:food/horse_meat_cooked", horse_meat_cooked);
        register("miteitfrb:armor/wolf_helmet", wolfHelmet);
        register("miteitfrb:armor/wolf_jacket", wolfChestplate);
        register("miteitfrb:armor/wolf_leggings", wolfLeggings);
        register("miteitfrb:armor/wolf_boots", wolfBoots);
        register("miteitfrb:apple_golden", goldenAppleLegend);
        register("miteitfrb:tools/copper_club", morningStarCopper);
        register("miteitfrb:tools/silver_club", morningStarSilver);
        register("miteitfrb:tools/gold_club", morningStarGold);
        register("miteitfrb:tools/iron_club", morningStarIron);
        register("miteitfrb:tools/nickel_club", morningStarNickel);
        register("miteitfrb:tools/ancient_metal_club", morningStarAncientMetal);
        register("miteitfrb:tools/mithril_club", morningStarMithril);
        register("miteitfrb:tools/tungsten_club", morningStarTungsten);
        register("miteitfrb:tools/adamantium_club", morningStarAdamantium);
        register("miteitfrb:frag/stalker_creeper", fragStalkerCreeper);
        register("miteitfrb:food/glow_berries", glowberries);
        register("miteitfrb:arrows/magical_arrow", arrowMagical);
        register("miteitfrb:wand/lava", lavaWand);
        register("miteitfrb:wand/ice", freezeWand);
        register("miteitfrb:wand/thunder", shockWand);
        register("miteitfrb:potion/suspicious_potion", suspiciousPotion);
        register("miteitfrb:potion/experimental_potion", experimentalPotion);
        register("miteitfrb:misc/azurite", shardAzurite);
        register("miteitfrb:records/record_damnation", recordDamnation);
        register("miteitfrb:records/record_connected", recordConnected);
        register("miteitfrb:tools/vibranium_sword", vibraniumSword);
        register("miteitfrb:armor/vibranium_helmet", vibraniumHelmet);
        register("miteitfrb:armor/vibranium_chestplate", vibraniumChestplate);
        register("miteitfrb:armor/vibranium_leggings", vibraniumLeggings);
        register("miteitfrb:armor/vibranium_boots", vibraniumBoots);
        register("miteitfrb:armor/null_helmet", helmetCustom_a);
        register("miteitfrb:armor/null_chestplate", chestplateCustom_a);
        register("miteitfrb:armor/null_leggings", leggingsCustom_a);
        register("miteitfrb:armor/null_boots", bootsCustom_a);
        register("miteitfrb:armor/null_helmet", helmetCustom_b);
        register("miteitfrb:armor/null_chestplate", chestplateCustom_b);
        register("miteitfrb:armor/null_leggings", leggingsCustom_b);
        register("miteitfrb:armor/null_boots", bootsCustom_b);
        register("miteitfrb:armor/ancient_metal_sacred_helmet", helmetAncientMetalSacred);
        register("miteitfrb:armor/ancient_metal_sacred_chestplate", chestplateAncientMetalSacred);
        register("miteitfrb:armor/ancient_metal_sacred_leggings", leggingsAncientMetalSacred);
        register("miteitfrb:armor/ancient_metal_sacred_boots", bootsAncientMetalSacred);
        register("miteitfrb:misc/ancient_metal_armor_piece", ancientMetalArmorPiece);
        register("miteitfrb:food/agave", agave);
        register("miteitfrb:misc/pulque", pulque);
        register("miteitfrb:misc/ale", ale);
        register("miteitfrb:armor/uru_helmet", uruHelmet);
        register("miteitfrb:armor/uru_chestplate", uruChestplate);
        register("miteitfrb:armor/uru_leggings", uruLeggings);
        register("miteitfrb:armor/uru_boots", uruBoots);
        register("miteitfrb:misc/forging_note", forgingNote);
        register("miteitfrb:ingots/uru", uruIngot);
        register("miteitfrb:nuggets/uru", uruNugget);
        register("miteitfrb:tools/uru_battle_axe", uruBattleAxe);
        register("miteitfrb:tools/uru_mattock", uruMattock);
        register("miteitfrb:tools/uru_scythe", uruScythe);
        register("miteitfrb:tools/uru_sword", uruSword);
        register("miteitfrb:tools/uru_war_hammer", uruWarHammer);
        register("miteitfrb:tools/uru_club", uruMorningStar);
        register("miteitfrb:tools/uru_pickaxe", uruPickaxe);
        register("miteitfrb:pieces/uru", pieceUru);
        register("miteitfrb:bows/tungsten/", bowTungsten).setUnlocalizedName("tungsten_bow");
        register("miteitfrb:food/beetroot", beetroot);
        register("miteitfrb:food/beetroot_seeds", seedsBeetroot);
        register("miteitfrb:hardened_clay_bowls/raw", clayBowlRaw);
        register("miteitfrb:hardened_clay_bowls/beef_stew", clayBowlBeefStew);
        register("miteitfrb:hardened_clay_bowls/beetroot_soup", clayBowlBeetrootSoup);
        register("miteitfrb:hardened_clay_bowls/bowl_milk", clayBowlMilk);
        register("miteitfrb:hardened_clay_bowls/bowl_salad", clayBowlSalad);
        register("miteitfrb:hardened_clay_bowls/bowl_water", clayBowlWater);
        register("miteitfrb:hardened_clay_bowls/bowl_water_pure", clayBowlWaterPure);
        register("miteitfrb:hardened_clay_bowls/cereal", clayBowlCereal);
        register("miteitfrb:hardened_clay_bowls/chicken_soup", clayBowlChickenSoup);
        register("miteitfrb:hardened_clay_bowls/cream_of_mushroom_soup", clayBowlCreamOfMushroomSoup);
        register("miteitfrb:hardened_clay_bowls/cream_of_vegetable_soup", clayBowlCreamOfVegetableSoup);
        register("miteitfrb:hardened_clay_bowls/empty", clayBowlEmpty);
        register("miteitfrb:hardened_clay_bowls/ice_cream", clayBowlIceCream);
        register("miteitfrb:hardened_clay_bowls/lampchop_stew", clayBowlLampchopSoup);
        register("miteitfrb:hardened_clay_bowls/lemonade", clayBowlLemonade);
        register("miteitfrb:hardened_clay_bowls/mashed_potato", clayBowlMashedPotato);
        register("miteitfrb:hardened_clay_bowls/mushroom_stew", clayBowlMushroomStew);
        register("miteitfrb:hardened_clay_bowls/porkchop_stew", clayBowlPorkchopStew);
        register("miteitfrb:hardened_clay_bowls/porridge", clayBowlPorridge);
        register("miteitfrb:hardened_clay_bowls/pumpkin_soup", clayBowlPumpkinSoup);
        register("miteitfrb:hardened_clay_bowls/salmon_soup", clayBowlSalmonSoup);
        register("miteitfrb:hardened_clay_bowls/sorbet", clayBowlSorbet);
        register("miteitfrb:hardened_clay_bowls/vegetable_soup", clayBowlVegetableSoup);
        register("miteitfrb:totem/totem_of_fecund", totemOfFecund);
        register("miteitfrb:totem/totem_of_destroy", totemOfDestroy);
        register("miteitfrb:totem/totem_of_knowledge", totemOfKnowledge);
        register("miteitfrb:totem/totem_of_preserve", totemOfPreserve);
        register("miteitfrb:totem/totem_of_hunting", totemOfHunting);
        register("miteitfrb:ignition/wood", ignitionWood);
        register("miteitfrb:ignition/copper", ignitionCopper);
        register("miteitfrb:ignition/silver", ignitionSilver);
        register("miteitfrb:ignition/gold", ignitionGold);
        register("miteitfrb:ignition/nickel", ignitionNickel);
        register("miteitfrb:ignition/ancient_metal", ignitionAncientMetal);
        register("miteitfrb:ignition/mithril", ignitionMithril);
        register("miteitfrb:ignition/tungsten", ignitionTungsten);
        register("miteitfrb:ignition/adamantium", ignitionAdamantium);
        register("miteitfrb:misc/wither_branch", wither_branch);
        register("miteitfrb:tools/detector", detectorDiamond);
        register("miteitfrb:tools/detector_emerald", detectorEmerald);
        register("miteitfrb:misc/sulphur_sphere", sulphur);
        register("miteitfrb:bows/uru/", bowUru).setUnlocalizedName("uru_bow");
        register("miteitfrb:misc/ender_rod", enderRod);
        register("miteitfrb:tools/rusted_iron_club", morningStarRustedIron);
        register("miteitfrb:buckets/wood/empty", woodBucket);
        register("miteitfrb:buckets/wood/water", woodBucketWater);
        register("miteitfrb:buckets/wood/water_pure", woodBucketWaterPure);
        register("miteitfrb:buckets/wood/milk", woodBucketMilk);
        register("miteitfrb:tools/flint_hoe", hoeFlint);
        register("miteitfrb:food/peeled_sugarcane", peeledSugarcane);
        register("miteitfrb:totem/totem_of_sentry", totemOfSentry);
        register("miteitfrb:totem/totem_of_unknown", totemOfUnknown);
        register("miteitfrb:ignition/rusted_iron", ignitionRustedIron);
        register("miteitfrb:tools/stick_knife", stickKnife);
        register("miteitfrb:wand/slime", slimeWand);
        register("miteitfrb:misc/ice_chunk", iceChunk);
        register("miteitfrb:armor/ice_helmet", iceHelmet);
        register("miteitfrb:armor/ice_chestplate", iceChestplate);
        register("miteitfrb:armor/ice_leggings", iceLeggings);
        register("miteitfrb:armor/ice_boots", iceBoots);
        register("miteitfrb:food/ice_sucker", ice_sucker);
        register("miteitfrb:food/melon_ice", melon_ice);
        register("miteitfrb:food/chocolate_smoothie", chocolate_smoothie);
        register("miteitfrb:misc/frost_rod", frostRod);
        register("miteitfrb:misc/frost_powder", frostPowder);
        register("miteitfrb:totem/totem_of_flattening", totemOfFlattening);
        register("miteitfrb:loot_pack/lich", lootPackLich);
        register("miteitfrb:pocket/mine", minePocket);
        register("miteitfrb:kettle/leather", leatherKettle).setUnlocalizedName("leather_kettle");
        register("miteitfrb:kettle/leather", leatherKettlePure).setUnlocalizedName("leather_kettle_pure");
        register("miteitfrb:jug/clay", clayJug).setUnlocalizedName("clay_jug");
        register("miteitfrb:jug/hardened_clay", hardenedClayJug).setUnlocalizedName("hardened_clay_jug");
        register("miteitfrb:jug/hardened_clay", hardenedClayJugPure).setUnlocalizedName("hardened_clay_jug_pure");
        register("miteitfrb:wand/ender", enderWand);
        register("miteitfrb:misc/boss_detector", bossDetector);
        register("miteitfrb:kettle/leather", uruKettle).setUnlocalizedName("uru_kettle");
        eventCache = null;
    }

    private static Item register(String texture, Item item) {
        return eventCache.register(NameSpace, texture, item, ITFItem);
    }
}
